package edu.ustc.crm.action;

import com.opensymphony.xwork2.ActionSupport;

import edu.ustc.crm.manager.UserManager;

public class UserAction extends ActionSupport {
	private UserManager userManager;
	public UserManager getUserManager() {
		return userManager;
	}
	public void setUserManager(UserManager userManager) {
		this.userManager = userManager;
	}

	private String userName;
	private String userPwd;
	
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getUserPwd() {
		return userPwd;
	}
	public void setUserPwd(String userPwd) {
		this.userPwd = userPwd;
	}
	
	public String login(){
		System.out.println(userName);
		System.out.println(userPwd);
		boolean bln = userManager.checkLogin(userName, userPwd);
		if(bln == true){
			return SUCCESS;
		}else{
			return "input";
		}
		
	}
	
}
